package cn.xiaou.service;


import java.util.List;

import cn.xiaou.domain.Stock;
import cn.xiaou.domain.Transaction;
import cn.xiaou.domain.User;
import cn.xiaou.domain.UserReal;

public interface UserService {

	Boolean registerUser(User user);

	boolean isExistUserByUsername(String username);

	boolean checkExistEmail(String email);

	User loginUser(String username, String password);

	void activationMailbox(Integer uid) ;

	Integer modifyPasswordByUsername(String text);

	Integer modifyPasswordByEmail(String text);

	Boolean checkModifyPasswordCodeByCode(String codeStr, Integer modify_id);

	Boolean modifyPasswordByModifyId(Integer modify_id, String newPasswordStr);

	void updateState(Integer modify_id);

	Boolean addRealName(UserReal userReal);

	UserReal checkRealnameExist(User user);

	List<Stock> findAllStock();

	Boolean commitOrder(Transaction tran);

	Boolean Recharge(User user, Integer money);
	
	List<Transaction> findUserTransaction(User user);
	Boolean sellSock(Transaction order);

	Boolean sellStock(Transaction tran, Double money, Integer count);
}
